package com.example.springsession.springbean;

import com.example.springsession.controller.HelloCo3;
import org.springframework.beans.factory.support.BeanDefinitionRegistry;
import org.springframework.beans.factory.support.BeanNameGenerator;
import org.springframework.beans.factory.support.RootBeanDefinition;
import org.springframework.context.annotation.ImportBeanDefinitionRegistrar;
import org.springframework.core.type.AnnotationMetadata;

/**
 * Created by Administrator on 2020/7/25 0025.
 */
public class BeanSelector implements ImportBeanDefinitionRegistrar {

    @Override
    public void registerBeanDefinitions(AnnotationMetadata metadata, BeanDefinitionRegistry registry) {
        RootBeanDefinition beanDefinition=new RootBeanDefinition(HelloCo3.class);
        registry.registerBeanDefinition("helloCo3",beanDefinition);
    }
}
